package org.infodavid.common.model.impl.criteria;

import org.infodavid.common.model.behaviors.IApprovable.EApprovalStatus;
import org.infodavid.common.model.criteria.IUserConnectionCriteria;
import org.infodavid.common.model.impl.criteria.SortCriteriaImpl;

/**
 * The Class UserConnectionCriteriaImpl.
 */
public class UserConnectionCriteriaImpl extends SortCriteriaImpl implements IUserConnectionCriteria {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -5781804069003150179L;

	private long userKey = 0;

	private EApprovalStatus status = null;

	private Boolean requested = null;

	/**
	 * The Constructor.
	 */
	public UserConnectionCriteriaImpl() {
		super();
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IUserConnectionCriteria#isRequested()
	 */
	public Boolean isRequested() {
		return requested;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IUserConnectionCriteria#getUserKey()
	 */
	public long getUserKey() {
		return userKey;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IUserConnectionCriteria#setUserKey(long)
	 */
	public void setUserKey(final long value) {
		userKey = value;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IUserConnectionCriteria#setRequested(java.lang.Boolean)
	 */
	public void setRequested(final Boolean flag) {
		requested = flag;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IUserConnectionCriteria#getStatus()
	 */
	public EApprovalStatus getStatus() {
		return status;
	}

	/*
	 * (non-Javadoc)
	 * @see
	 * org.infodavid.common.model.criteria.IUserConnectionCriteria#setStatus(org.infodavid.common.model
	 * .behaviors.IApprovable.EApprovalStatus)
	 */
	public void setStatus(final EApprovalStatus value) {
		status = value;
	}

	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		final StringBuilder builder = new StringBuilder();

		builder.append(super.toString());
		builder.append("[userKey=");
		builder.append(userKey);
		builder.append(", status=");
		builder.append(status);
		builder.append(", requested=");
		builder.append(requested);
		builder.append("]");

		return builder.toString();
	}
}
